xen/arm: p2m: Re-implement p2m_insert_mapping using p2m_set_entry
authorJulien Grall <julien.grall@arm.com>
Thu, 15 Sep 2016 11:28:36 +0000 (12:28 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 28 Sep 2016 01:14:16 +0000 (18:14 -0700)
commit493f535a06b5b4041c0745e954780dd5d6f80581
tree068f98332aa91b33ad205ce2dbbfe09ee64803e5
parent97919d2d926a29489d8cfe4aacf64125346679f2
xen/arm: p2m: Re-implement p2m_insert_mapping using p2m_set_entry

The function p2m_insert_mapping can be re-implemented using the generic
function p2m_set_entry.

Note that the mapping is not reverted anymore if Xen fails to insert a
mapping. This was added to ensure the MMIO are not kept half-mapped
in case of failure and to follow the x86 counterpart. This was removed
on the x86 part by commit c3c756bd "x86/p2m: use large pages for MMIO
mappings" and I think we should let the caller taking care of it.

Finally drop the operation INSERT in apply_* as nobody is using it
anymore. Note that the functions could have been dropped in one go at the
end, however I find easier to drop the operations one by one avoiding a
big deletion in the patch that convert the last operation.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Tested-by: Tamas K Lengyel <tamas@tklengyel.com>
xen/arch/arm/p2m.c